package com.example.elemui_demo.test;

import cn.hutool.core.convert.Convert;

import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * @ClassName HuToolTEst
 * @Description
 * @Author zhangsw
 * @Date 2021/1/12 14:10
 * @Version 1.0
 */
public class HuToolTEst {

    public static void main(String[] args) {
        String str = Convert.toStr(1);
        System.err.println(str);
        String[] b = {"1", "2", "3", "4", "5", "6"};
        Integer[] intArr = Convert.toIntArray(b);
        for (Integer item : intArr) {
            System.err.println(item);
        }
        String dateStr = "2020-11-12";
        Date date = Convert.toDate(dateStr);
        System.err.println(date);
        LocalDateTime localDateTime = Convert.toLocalDateTime(dateStr);
        System.err.println(localDateTime);
        Object[] objArr = {"a", 1};
        List<String> strList = Convert.toList(String.class, objArr);
        for (String s : strList) {
            System.out.println(s);
        }
    }
}
